package com.keboom.show;

import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType;
import org.mybatis.generator.internal.types.JavaTypeResolverDefaultImpl;

/**
 * mybatis-generator默认tinyint类型映射为byte类型
 *
 * 此类将tinyint映射成integer类型
 *
 * Created by keboom on 2020/9/8.
 */
public class JavaTypeResolverImplUtil extends JavaTypeResolverDefaultImpl {
    public JavaTypeResolverImplUtil(){
        super();
        super.typeMap.put(-6,
                new JavaTypeResolverDefaultImpl.JdbcTypeInformation("TINYINT",
                        new FullyQualifiedJavaType(Integer.class.getName())));
    }
}
